package com.baidu._01_fanxing;

public class TestBox {
    public static void main(String[] args) {
        // 1.创建Box对象的时候，给里面的name指定的数据类型String或Integer...
        Box<String> box = new Box<>("张三");
        System.out.println(box.getName());
        box.setName("ikun");
        System.out.println(box.getName());

        System.out.println("------------------------------");

        Integer object =  MyTest.getObject(123);
        String abc =  MyTest.getObject("abc");
        MyTest.getObject(new Box<>("ikun"));


        System.out.println("测试泛型方法");
        Integer object1 = MyScannerUtils.getObject(1);
        Double object2 = MyScannerUtils.getObject(0.1);
        String object3 = MyScannerUtils.getObject("abc");
        System.out.println(object1);
        System.out.println(object2);
        System.out.println(object3);
    }
}
